package store

import (
	"context"
	"pay/model"
	"pay/model/entity"
)

type IFeePlanGroupObject interface {
	// Create
	Create(ctx context.Context, e *entity.FeePlanGroupObject) (int64, error)

	CreateInBatch(ctx context.Context, e []*entity.FeePlanGroupObject, size int) error

	// Find
	Find(ctx context.Context, in *model.FeePlanGroupObjectInfoRequest) (*entity.FeePlanGroupObject, error)
	// Update
	Update(ctx context.Context, id int64, updates map[string]interface{}) error

	// Delete
	UpdateByGroupId(ctx context.Context, id int64, updates map[string]interface{}) error

	// Delete
	Delete(ctx context.Context, id int64) error

	// DeleteByGroupID
	DeleteByGroupId(ctx context.Context, groupId int64) error

	// List
	List(ctx context.Context, in *model.FeePlanGroupObjectListRequest, opts ...model.QueryOptions) (int, []*entity.FeePlanGroupObject, error)
	// ExecTransaction
	ExecTransaction(ctx context.Context, callback func(ctx context.Context) error) error
}
